Component({
  /**
   * 组件的属性列表
   */
  properties: {
    orgUserList:{
      type:Array,
      value:[]
    },
   
    addImgUrl:{
      type:String,
      value:"/images/icon/start.jpg",
    },
    imgHeight:{
      type:String,
      value:"60px",
    },
    imgWidth:{
      type:String,
      value:"60px",
    }
  },
  observers:{
    orgUserList:function(value){
      if(!value){
        this.setData({
          userList:[]
        })
      }
      else{
        this.setData({
          userList:value
        })
      }
    },
  },
  /**
   * 组件的初始数据
   */
  data: {
    userList:[],
    userDialogShow:false,
    date:'2025-12'
  },

  /**
   * 组件的方法列表
   */
  methods: {
    selectFile(e:any){
      console.log("开始选择用户",e)
      this.setData({
        userDialogShow:true
      })
    },
    deleteImage(e:any){
      console.log("删除图片",e.currentTarget.dataset.index)
      let index = e.currentTarget.dataset.index;
      let myList = this.data.userList
      myList.splice(index,1)   
      this.setData({
        userList: myList
      })
      this.triggerEvent('dataChanged', {userList:this.data.userList}) 
    },
    bindUserSeleted(e:any){
      console.log("接收到子组件传递信息",e);
      this.setData({
        userList:this.data.userList.concat(e.detail.value)
      })
      this.triggerEvent('dataChanged', {userList:this.data.userList}) 
    }
  },

})